package test.com.sky.thread;

public class JoinDemo {


    public static void main(String[] args) throws InterruptedException {


        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {

                System.out.println("线程1执行了...");

                try {
                    Thread.sleep(3111);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }

                System.out.println("线程1执行完毕...");
            }
        }, "线程1");

        thread.setDaemon(false);
        thread.start();
        thread.join();
        Thread.sleep(1111);

//        thread.join();




    }



}
